package com.payment.service.impl;

import com.payment.entity.payresults.OceanPaymentResults;
import com.payment.entity.payresults.PaypalNotificationpaymentResults;
import com.payment.entity.payresults.PaypalpaymentResults;
import com.payment.entity.payresults.WXNotificationpaymentResults;
import com.payment.mapper.NotificationpaymentMapper;
import com.payment.service.NotificationpaymentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Transactional
@Service
public class NotificationpaymentServiceImpl implements NotificationpaymentService {

    @Resource
    NotificationpaymentMapper paymentMapper;

    @Override
    public int findCountByOutTradeno(String out_trade_no) {
        return paymentMapper.findCountByOutTradeno(out_trade_no);
    }

    @Override
    public void insertPaymentResults(WXNotificationpaymentResults results) {
        paymentMapper.insertPaymentResults(results);
    }

    @Override
    public int findCountByOrderNumber(String orderNumber) {
        return paymentMapper.findCountByOrderNumber(orderNumber);
    }

    @Override
    public void insertPaymentResultsPaypal(PaypalNotificationpaymentResults results) {
        paymentMapper.insertPaymentResultsPaypal(results);
    }

    @Override
    public int findCountByInvoiceNumber(String invoice_number) {
        return paymentMapper.findCountByInvoiceNumber(invoice_number);
    }

    @Override
    public void addPaypalpaymentResults(PaypalpaymentResults results) {
        paymentMapper.addPaypalpaymentResults(results);
    }

    @Override
    public void insertOceanPaymentResults(OceanPaymentResults oceanPaymentResults) {
        paymentMapper.insertOceanPaymentResults(oceanPaymentResults);
    }
}
